<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich" xml:lang="en">
<head>
<title>课件添加</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
	content="A short description of this page." />
<link href="#{facesContext.externalContext.requestContextPath}/css/public.css" rel="stylesheet" type="text/css"
	media="screen" />
<link href="#{facesContext.externalContext.requestContextPath}/css/main.css" rel="stylesheet" type="text/css"
	media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<!-- rich:message style-->
<style type="text/css">
	.rich-message-label{
		color:red;
	}
</style>
</head>
<body style="background-color: #ffffff">

<h:form>
	<div id="right">
	<div id="msgid" class="error pt10p bcf c0 tal" style="display:">
		<a4j:outputPanel  id="msgPanel">
		<center>
			<h:outputText styleClass="cff" value="#{CoursewareBB.msg}" />
		</center>
	</a4j:outputPanel>
	</div>
	<div class="tablelist">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td><span class="cff">*</span>OFFICE<h:selectOneMenu class="style_input" value="#{CoursewareBB.courseware.office_code}">
	 			<f:selectItems value="#{otherParamBB.selectItems_officeInfId}" />
			</h:selectOneMenu></td>
			<td><span class="cff">*</span>技能组<h:selectOneMenu class="style_input" value="#{CoursewareBB.courseware.tp_userkind}">
				<f:selectItems value="#{paramBB.selectItems_param}" />
			</h:selectOneMenu></td>
		</tr>
		<tr>
			<td class="yellow"><span class="cff">*</span>课件标题  <h:inputText id="tp_cwtitle"
				 class="style_input"  value="#{CoursewareBB.courseware.tp_cwtitle}"
				 required="true" ><f:validateLength minimum="2" maximum="25" /></h:inputText></td>
			<td class="yellow"><span class="cff">*</span>课件状态 <h:selectOneMenu class="style_input" value="#{CoursewareBB.courseware.tp_state}">
	 			<f:selectItems  value="#{paramBB.selectItem['tp_courseware_state']}"  />
			</h:selectOneMenu></td>
		</tr>
		<tr>
			<td><rich:message for="tp_cwtitle" showSummary="true" showDetail="false" /></td>
			<td></td>
		</tr>
		<tr>
			<td colspan="2"><span class="cff">*</span>内容简介 <label>
			<h:inputTextarea id="tp_cwsyno" value="#{CoursewareBB.courseware.tp_cwsyno}" class="style_textarea" required="true"><f:validateLength minimum="2" maximum="500" /></h:inputTextarea></label>
			 <rich:message for="tp_cwsyno" showSummary="true" showDetail="false" /></td>
		</tr>
		<tr>
			<td colspan="2"><span class="cff">*</span>内容描述 <label> <h:inputTextarea id="tp_cwcont"
				value="#{CoursewareBB.courseware.tp_cwcont}" class="style_textarea" required="true"><f:validateLength minimum="2" maximum="2000" /></h:inputTextarea> </label>
				<rich:message for="tp_cwcont" showSummary="true" showDetail="false" /></td>
		</tr>
		<tr>
			<td colspan="2">
			<rich:fileUpload fileUploadListener="#{CoursewareBB.uploadListener}" 
									 listHeight="60" 
									 listWidth="730" 
									 style="border:1px solid #ff0000;"
									 addButtonClassDisabled="false"
									 addControlLabel="添加附件"
									 cancelEntryControlLabel="取消"
									 clearAllControlLabel="清除所有"
									 clearControlLabel="清除"
									 doneLabel="完成"
									 uploadControlLabel="上传"
					                 maxFilesQuantity="1"  
					                 id="upload"   
					                 uploadButtonClass="true"
					                 immediateUpload="ture"  
					                 sizeErrorLabel="你输入的文件格式或大小不正确，请重新选择！"
					                 onsizerejected="文件过大"
					                 acceptedTypes="jpg, gif, png, bmp, jpeg, doc, xls, zip, pdf, ppt, rar, tip">
						<rich:ajaxValidator event="onblur"/>
					</rich:fileUpload>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<rich:message for="upload">
						<f:facet name="passedMarker">
							<h:graphicImage value="/images/main/passed.gif" />
						</f:facet>
						<f:facet name="errorMarker">
							<h:graphicImage value="/images/main/error.gif" />
						</f:facet>
				</rich:message>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<h:outputText value="支持 JPG、JPEG、GIF、BMP、PNG、DOC、XLS、ZIP、PDF、PPT、RAR、TIP文件格式，请注意上传文件大小限制。"> </h:outputText>
			</td>
		</tr>
	</table>
	<div class="listbut">
		<h:commandButton styleClass="buttonbg" value="保存"  action="#{CoursewareBB.addCourseware}" reRender="msgPanel"/>
		<h:commandButton styleClass="buttonbg" value="返回" action="#{CoursewareBB.toBack}" immediate="true"/></div>
	</div>
	</div>
</h:form>
</body>
</html>

